package com.swt.gap.dao;

import com.swt.gap.model.entity.OntologyNodeProperty;
import com.swt.gap.model.vo.element.EventElementVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OntologyNodePropertyDao {
    int deleteByPrimaryKey(Integer propertyId);

    int insertSelective(OntologyNodeProperty record);

    OntologyNodeProperty selectByPrimaryKey(Integer propertyId);

    int updateByPrimaryKeySelective(OntologyNodeProperty record);

    List<OntologyNodeProperty> selectByEntityId(Integer entityId);

    OntologyNodeProperty selectByPropertyKey(@Param("nodeId") Integer nodeId, @Param("propertyKey") String propertyKey);

    int deleteByEntityId(Integer entityId);

    /**
    * 根据单个label获取节点的主键属性key
    * @param label String
    * @return List<String>
    * @author sx
    */
    List<String> listPrimaryKeyByLabel(String label);

    /**
     * 根据多个labels获取节点的主键属性key
     * @param labels String
     * @return List<String>
     * @author sx
     */
    List<String> listPrimaryKeyByLabels(String labels);

    /**
    * 根据labels获取节点的可统计的属性key
    * @param labels String
    * @return List<String>
    * @author sx
    */
    List<String> listCountPropertyKeyByLabels(String labels);

    List<EventElementVO> selectKeyByOntologyNodeId(Integer entityId);

    /**
     * 根据labels获取节点的所有属性key
     * @param labels String
     * @return List<String>
     * @author sx
     */
    List<String> listPropertyKeyByLabels(String labels);


    List<OntologyNodeProperty> listAllPropertyByLabels(String labels);
}